<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFeedbackTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('feedback', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('用户id');
            $table->string('fb_title', 150)->default('')->comment('反馈消息标题');
            $table->text('fb_content')->default('')->comment('反馈内容');
            $table->text('re_content')->nullable()->comment('回复内容');
            $table->dateTime('fb_time')->comment('反馈时间');
            $table->tinyInteger('fb_status')->default(0)->comment('状态0为新消息未阅读，1为已阅读，2为已处理,-1删除');
            $table->index('fb_status');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('feedback');
    }
}
